var ResponObj = require("../_include/responObj");
var db = require("../../core/db/index");

module.exports = {
	prefix: "/hehe",
	get: {
		"/": function() {
			this.body = "heheheheeh"
		},
		"/:id": function() {
			var id = this.params.id;
			this.body = "id:" + id;
		}
	},
	post: {
		"/": function() {
			var body = this.request.body;
			var query = this.request.query;

			body._id = Math.random();
			body.arr = ["id",{
				id:id,
				time:new Date
			}];

			var ac = new Actives()
			ac.user_id = body._id;

			ac_collection.find({
				user_id:body._id,
			});

			db.insert("xxxxx", body);

			this.body = ResponObj("json", db.find_all("xxxxx"));
		}
	}
}